<template>
  <div class="complaint-info">
    <el-scrollbar class="scroll-wrapper">
      <div class="content">
        <div class="section-title syht14">基本信息</div>
        <div class="list-con">
          <div class="li">
            <div class="li-key">监测规则名称</div>
            <div class="li-val">{{ comInfo.jobName }}</div>
          </div>
          <div class="li">
            <div class="li-key">编码</div>
            <div class="li-val">{{ comInfo.jobNum }}</div>
          </div>
          <div class="li">
            <div class="li-key">关联算法</div>
            <div class="li-val" v-if="comInfo.jobRelInfoVOList && comInfo.jobRelInfoVOList.length">
              <p class="p-list" v-for="(item, index) in comInfo.jobRelInfoVOList" :key="item.busId">
                {{ index + 1 }}、{{ item.busName }}
              </p>
            </div>
          </div>
          <div class="li">
            <div class="li-key">运行频率</div>
            <div class="li-val">
              {{ comInfo.cronName }}
              <!-- {{ comInfo.jobCron }} -->
            </div>
          </div>
          <div class="li">
            <div class="li-key">规则说明</div>
            <div class="li-val">{{ comInfo.jobDescribe }}</div>
          </div>
          <div class="li">
            <div class="li-key">生效状态</div>
            <div class="li-val">{{ comInfo.jobState | statusFilter }}</div>
          </div>
        </div>
      </div>
    </el-scrollbar>
  </div>
</template>

<script>
import { STATE } from '@utility/dict'

export default {
  components: {},
  props: {
    comInfo: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {
      // USER_TYPE_PERSON: BBCS_MSG_USER_TYPE.person,
    }
  },
  computed: {},
  filters: {
    statusFilter(status) {
      return STATE[status] || ''
    },
  },
  created() {},
  methods: {},
}
</script>

<style lang="scss" scoped>
@import '@styles/detailsTable.scss';
.complaint-info {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  .scroll-wrapper {
    flex: 1;
  }
  .content {
    padding: 20px;

    .section-title {
      margin-bottom: 15px;
      padding-left: 15px;
      border-left: 3px solid #3b93f7;
    }
  }
}
</style>
